local skel = fk.CreateSkill {
  name = "lb__hantui",
  tags = { Skill.Compulsory, }
}

Fk:loadTranslationTable {
  ["lb__hantui"] = "寒腿",
  --[":lb__hantui"] = "<b>锁定技</b>，若你发动<a href=':lb__jiaqian'><font color='red'>〖加钱〗</font></a>的次数大于1，本局游戏中未因〖加钱〗摸牌的角色对你造成的伤害+1。",
  --9.23
  --[":lb__hantui"] = "<b>锁定技</b>，若你发动<a href=':lb__jiaqian'><font color='red'>〖加钱〗</font></a>的次数大于1，本局游戏未因〖加钱〗摸牌的角色对你造成的伤害+1，其对你造成伤害后，重置你对其发动<a href=':lb__quantao'><font color='red'>〖圈套〗</font></a>的次数。",
  --10.12
  [":lb__hantui"] = "<b>锁定技</b>，一名角色每轮首次对你造成伤害时，若你发动<a href=':lb__jiaqian'><font color='red'>〖加钱〗</font></a>的次数大于1且你未对其发动过〖加钱〗，此伤害+1并重置你对其发动<a href=':lb__quantao'><font color='red'>〖圈套〗</font></a>的次数。",

  ["$lb__hantui1"] = "好家伙……",
  ["$lb__hantui2"] = "打、打人不打脸！",
}

skel:addEffect(fk.DamageInflicted, {
  anim_type = "negative",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skel.name) and not player.dead and
        player:usedSkillTimes("lb__jiaqian", Player.HistoryGame) > 1 and
        data.from and not table.contains(player:getTableMark("@[player]lb__jiaqian"), data.from.id) and
        (#player.room.logic:getEventsOfScope(GameEvent.Damage, 1, function(e)
          local damage = e.data
          return damage.from == data.from and damage.to == player and damage ~= data
        end, Player.HistoryRound) == 0)
        --]]
  end,
  on_use = function(self, event, target, player, data)
    data.damage = data.damage + 1
    player.room:removeTableMark(player, "@[player]lb__quantao", data.from.id)
  end,
})
--[[
    data.extra_data = data.extra_data or {}
    data.extra_data.lb__hantui = target.id
  end,
})

skel:addEffect(fk.Damage, {
  can_refresh = function(self, event, target, player, data)
    return player:hasSkill(skel.name, true) and data.from and data.extra_data and data.extra_data.lb__hantui == data.from.id
  end,
  on_refresh = function(self, event, target, player, data)
    player.room:removeTableMark(player, "lb__quantao", data.extra_data.lb__hantui)
  end,
})
--]]
return skel
